#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin >> s;
    unordered_map<char, bool> f;
    for(auto ch : s)
    {
        if(ch != 'i') f[ch] = true; 
    }
    cout << f.size() << endl;
    return 0;
}